The invention relates generally to computer-based database systems and more particularly to methods and devices to perform page-level transformations on relational database objects.
Over the life-span of a commercial database product, schema changes may be introduced. That is, as a database product evolves the range of schema attributes supported by that product naturally grows. Some of these schema changes may necessitate that older database objects (e.g., table spaces and index spaces) be dropped and recreated when being migrated from an older version to a newer version of the database. Dropping and recreating an object causes that object to go off-line, making it unavailable for use during the recreation operation. If the object is large or crucial to a business' operation (such as an order-entry database table and/or an associated index), the time needed to transition the object can be prohibitive. It may not be commercially feasible to take the object off-line long enough to transition it to a newer version.
One type of schema transformations are referred to as “page-level” transformations. In general, page-level schema changes refer to those types of changes that alter pages such as their order and number, but which do not change the length or the business data content of any row. (Purely internal values to a page may be changed however.) Accordingly, page-level schema changes are generally understood not to require that row data be moved from one page to another, even though page numbers and references to a page's internal rows may change. This same description applies to indexes if one uses the term “key entry” instead of “row.” Illustrative page-level schema changes that may be made in accordance with the invention include, but are not limited to: increasing page size, increasing data set size, increasing piece size, increasing row ID (RID) size, changing segment size and changing the compression attribute of an index.
Consider the case where a large database object is running up to a fixed limit in an older version of a relational database management system (RDBMS)—e.g., DB2®. (DB2 is a registered trademark of International Business Machines Corporation.) In order to continue using the object, it must be converted into an object that can be used in a newer version of the RDBMS, where the newer version of the RDBMS permits the object to have a larger data set size. In prior art approaches, this would have required the original (aka “source”) data object to be taken off-line so that it could be dropped, unloaded, recreated in accordance with the new schema and reloaded. In accordance with the invention, however, page-level schema changes may be made through a transformation process rather than unloading and reloading, a difference that significantly reduces the amount of time the object is taken off-line.